package com.feib.soeasy.dao;

import java.util.Date;
import java.util.List;

import com.feib.soeasy.model.FormatDefinition;
import com.feib.soeasy.model.Group;
import com.feib.soeasy.model.UploadFile;
import com.feib.soeasy.pagination.PaginatedList;


/**
 * @title (#)UploadFileDao.java<br>
 * @description 使用者上傳紀錄Dao<br>
 * @author Jimmy Liu<br>
 * @version 1.0.0 2010/11/25
 * @copyright Far Eastern International Bank Copyright (c) 2010<br>
 * @2010/11/12 create by Jimmy Liu<br>
 */
public interface UploadFileDao extends HibernateDao<UploadFile, Long> {

    /**
     * 依據查詢物件與上傳日期起迄查詢上傳紀錄
     * @param uploadFile 查詢條件
     * @param uploadFrom 上傳日期起
     * @param uploadTo 上傳日期迄
     * @param paginationConfig 換頁條件
     * @return
     */
    public PaginatedList<UploadFile> queryPaginationByUploadFile(UploadFile uploadFile, Date uploadFrom, Date uploadTo, PaginatedList<UploadFile> paginationConfig);

    /**
     * 取得單筆上傳檔案資料
     * @param uploadFilePk 上傳檔pk
     * @return 上傳檔案 UploadFile
     * @author Leo Lee
     * @since 2010/11/25
     */
    public UploadFile getUploadFileByPk(Long uploadFilePk);

    /**
     * 查詢待放行案件
     * @param uploadFile
     * @return
     */
    public List<UploadFile> queryUnConfirmByUploadFile(UploadFile uploadFile);

    /**
     * @param formatDefinition
     * @return
     */
    public int countUploadFileByFormatDefinition(FormatDefinition formatDefinition);

    /**
     * @param group
     * @return
     */
    public int countUploadFileByGroup(Group group);
    
    public List<UploadFile> findUploadFileByFileName(Group group, String fileName);
    
}
